deps: bump terraform-plugin-sdk to v2.38.2 to fix identity tracking bug#2841
Open
noeljackson wants to merge 1 commit intohashicorp:mainfrom
Open
deps: bump terraform-plugin-sdk to v2.38.2 to fix identity tracking bug#2841noeljackson wants to merge 1 commit intohashicorp:mainfrom
noeljackson wants to merge 1 commit intohashicorp:mainfrom
Conversation
Bumps terraform-plugin-sdk/v2 from v2.37.0 to v2.38.2, which includes three fixes for the ResourceIdentity tracking feature: - SDK v2.38.0 (hashicorp#1513): Validates identity values are not all-null - SDK v2.38.1 (hashicorp#1527): Skips identity change validation when prior identity has all-null attributes (fixes existing corrupted state) - SDK v2.38.2 (hashicorp#1544): Prevents 'Missing Resource Identity' error when resource create returns errors (e.g., timeout waiting for rollout) This resolves the 'Unexpected Identity Change' error reported in hashicorp#2779 that affects kubernetes_pod_v1, kubernetes_deployment_v1, kubernetes_stateful_set_v1, kubernetes_config_map_v1, kubernetes_horizontal_pod_autoscaler_v2, and other resources. Fixes hashicorp#2779
|
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement Learn more about why HashiCorp requires a CLA and what the CLA includes Have you signed the CLA already but the status is still pending? Recheck it. |
1 similar comment
|
Thank you for your submission! We require that all contributors sign our Contributor License Agreement ("CLA") before we can accept the contribution. Read and sign the agreement Learn more about why HashiCorp requires a CLA and what the CLA includes Have you signed the CLA already but the status is still pending? Recheck it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bumps
terraform-plugin-sdk/v2from v2.37.0 to v2.38.2 to fix theUnexpected Identity Changeerror (#2779).The SDK already has fixes for this, the provider just needs to pick them up:
Problem
When a resource takes a while to become ready (pod scheduling, image pull, node autoscaling) or the create times out, the
Readfunction never runs, so identity gets written to state as all-null. On the next plan,Readpopulates the real values, and the SDK treats that as an identity change and errors out.Right now the only workarounds are
terraform state rm+ recreate, or deleting the resource from the cluster. Both are pretty painful, especially in managed environments like Coder where users don't have direct state access.Fix
No provider code changes needed, just the SDK bump. The SDK v2.38.1+ handles null-to-real identity transitions gracefully instead of erroring.
Testing
go build ./...passesFixes #2779